Skip to content

Conversation

@wileyj
Copy link
Contributor

@wileyj wileyj commented Sep 18, 2025

uses https://github.com/zavoloklom/docker-compose-linter

./docker/docker-compose.yml was adjusted based on the above linter output (with some exceptions like alphabetic ordering of the services - defined in .dclintrc.

However, the linter repo does have this about yaml anchors: https://github.com/zavoloklom/docker-compose-linter?tab=readme-ov-file#anchor-handling

$ npx dclint docker/docker-compose.yml 
$ echo $?
0

and with the alphabetical ordering enforced as an error (services-alphabetical-order: 2):

$ npx dclint docker/docker-compose.yml 

/tmp/devnet/docker/docker-compose.yml
 389:1     error  Service "postgres" should be before "stacks-miner-1".  services-alphabetical-order
 410:1     error  Service "stacks-api" should be before "stacks-miner-1".  services-alphabetical-order
 443:1     error  Service "stacker" should be before "stacks-api".  services-alphabetical-order
 490:1     error  Service "monitor" should be before "postgres".  services-alphabetical-order

✖ 4 problems (4 errors, 0 warnings)
4 errors and 0 warnings potentially fixable with the `--fix` option.

$ echo $?
1

@wileyj
Copy link
Contributor Author

wileyj commented Sep 18, 2025

edit: looks like i have an error in the workflow file 🤔

Copy link
Contributor

@BowTiedRadone BowTiedRadone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! After the workflow is passing this PR is good to go 👍

second stacks-miner config that also configured the api.

some unnecessary comments were also removed
- CHAINSTATE_DIR=... make up with an absoluate path will resume a network using
  that dir.
- will not work with the genesis chainstate dir, and if a relative path
  is used, a genesis sync will start (using an epoch dir) from a nested
dir like ./docker/docker/chainstate/<epoch>
@wileyj
Copy link
Contributor Author

wileyj commented Sep 19, 2025

some more changes in this PR:

  • for stacks-miner-1, use an env var for the API event observer. this allows us to use a single config toml for all miners, with the env var defined in the compose file for stacks-miner-1 to also emit events to the api
  • if starting with CHAINSTATE_DIR defined (when the absolute path exists) - the network will resume from where it was stopped. relative paths will sync from genesis currently, since it will create a nested dir like ./docker/docker/chainstate/epoch

./docker/docker-compose.ym is a large diff due to the linter using a 2 spaces per tab vs the previous default of 4

Copy link
Contributor

@BowTiedRadone BowTiedRadone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@wileyj wileyj merged commit 94b8d2a into master Sep 22, 2025
1 check passed
@wileyj wileyj deleted the chore/lint branch September 23, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants